package com.zmn.plat.services.impl.product;

import java.util.List;

import javax.annotation.Resource;

import com.zmn.plat.model.entity.category.ServCategAndCategTwoQuery;
import com.zmn.plat.model.vo.product.ShowProductIdVO;
import org.springframework.stereotype.Service;

import com.zmn.plat.model.entity.product.ServProductPicture;
import com.zmn.plat.model.entity.product.ServProductPictureQuery;
import com.zmn.plat.persistence.interfaces.product.ServProductPictureDAO;
import com.zmn.plat.services.interfaces.product.ServProductPictureService;

/**
 * 描述:ServProductPictureServiceImpl
 *
 * @author tanghongjun
 * @since: 2018/10/16 17:56
 */
@Service
public class ServProductPictureServiceImpl implements ServProductPictureService {

    @Resource
    ServProductPictureDAO servProductPictureDAO;

    @Override
    public ServProductPicture findByKey(Integer productPictureId) {
        return servProductPictureDAO.findByKey(productPictureId);
    }

    @Override
    public ServProductPicture findByProductId(Integer productId) {
        return servProductPictureDAO.findByProductId(productId);
    }

    @Override
    public Integer findKeyForMax() {
        return servProductPictureDAO.findKeyForMax();
    }

    @Override
    public List<ServProductPicture> listByProductIds(List<Integer> productIds) {
        return servProductPictureDAO.listByProductIds(productIds);
    }

    @Override
    public List<ServProductPicture> listPageByQuery(ServProductPictureQuery query) {
        return servProductPictureDAO.listPageByQuery(query);
    }

    @Override
    public List<ServProductPicture> listByQuery(ServProductPictureQuery query) {
        return servProductPictureDAO.listByQuery(query);
    }

    @Override
    public List<ServProductPicture> listAll() {
        return servProductPictureDAO.listAll();
    }

    @Override
    public List<ShowProductIdVO> listConfigPictureProductIdByCategTwoQuery(List<ServCategAndCategTwoQuery> categIds) {
        return servProductPictureDAO.listConfigPictureProductIdByCategTwoQuery(categIds);
    }

    @Override
    public Integer countByQuery(ServProductPictureQuery query) {
        return servProductPictureDAO.countByQuery(query);
    }

    @Override
    public Integer updateByKey(ServProductPicture servProductPicture) {
        return servProductPictureDAO.updateByKey(servProductPicture);
    }

    @Override
    public Integer updateByProductIds(List<Integer> updateProductPictureProductIds, ServProductPicture updatePicture) {
        return servProductPictureDAO.updateByProductIds(updateProductPictureProductIds,updatePicture);
    }

    @Override
    public Integer insertBatch(List<ServProductPicture> addPictureList) {
        return servProductPictureDAO.insertBatch(addPictureList);
    }

    @Override
    public Integer insert(ServProductPicture servProductPicture) {
        return servProductPictureDAO.insert(servProductPicture);
    }

    @Override
    public Integer deleteByKey(Integer productPictureId) {
        return servProductPictureDAO.deleteByKey(productPictureId);
    }
}
